package com.example.demo.javatest.thread;

/**
 * Created by liujiahao on 2019/3/1.
 */
public class Mythread2  extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 200; i++) {
            if(this.isInterrupted()){
                System.out.println("已经停止了。");
                break;
            }
            System.out.println(i);
        }
    }
}
